// 登录相关的请求
import request from '@/utils/request'

export const getImageCode = () => request.get('/captcha/image')

export const getShortMessageCode = (captchaCode, captchaKey, moblie) => request.post('/captcha/sms', {
  captchaCode,
  captchaKey,
  moblie
})

export const getTokenAndLogin = (mobile, smsCode) => {
  // 帮我添加请求头
  return request.post('/passport/login', {
    form: {
      mobile,
      smsCode,
      partyData: {},
      isParty: false
    }
  }, {
    headers: { platform: 'H5' }
  })
}
